package com.inss.trial.utils;

import org.apache.commons.lang3.StringUtils;

public class CommUtils {
    public static String fillLenToStr(boolean before, String str, String sign, int len) {
        String tmp = "";
        str = StringUtils.isEmpty(str) ? "" : str;
        int diff = len - str.length();
        while (diff-- > 0) {
            tmp += sign;
        }
        return before ? (tmp + str) : (str + tmp);

    }
}
